package org.alanlau;

import org.alanlau.service.TestDIService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 测试
 * @author alan
 * @date  2020/1/12 0:51
 * @version 1.0
 */
public class TestDI
{
    public static void main( String[] args )
    {
        ApplicationContext appCon = new ClassPathXmlApplicationContext("applicationContext.xml");
        TestDIService ts = (TestDIService) appCon.getBean("testDIService");
        TestDIService ts2 = (TestDIService) appCon.getBean("testDIService2");
        ts.sayHello();
        ts2.sayHello();
    }
}
